import Vue from 'vue'
import Vuex from 'vuex'


import {
  createPersistedState,
  createSharedMutations
} from 'vuex-electron'

import modules from './modules'

Vue.use(Vuex)


export default new Vuex.Store({
  state: {
    last_page:'index'
  },

  mutations: {
    add(state , name) {
      state.last_page = name
    }
  },

  modules,
  plugins: [
    createPersistedState(),
    // createSharedMutations()
  ],
  strict: process.env.NODE_ENV !== 'production'
})